Class STPFrameImpl

All Implemented Interfaces:
IPCData, Pdu, Signal, STPFrame
Direct Known Subclasses:
RstpFrameImpl

public class STPFrameImpl extends PduImpl implements STPFrame
  • Field Details

    • protocolId

      protected Short protocolId
    • version

      protected Byte version
    • messageType

      protected STPBpduType messageType
    • flags

      protected Byte flags
    • rootBridgeId

      protected STPId rootBridgeId
    • rootPathCost

      protected int rootPathCost
    • bridgeId

      protected STPId bridgeId
    • portId

      protected Short portId
    • messageAge

      protected Short messageAge
    • maxAge

      protected Short maxAge
    • helloTime

      protected Short helloTime
    • forwardDelay

      protected Short forwardDelay
    • lengthValues

      protected List<STPTypeLengthValue> lengthValues
  • Constructor Details

    • STPFrameImpl

      public STPFrameImpl()
  • Method Details

    • getProtocolId

      public Short getProtocolId()
      Specified by:
      getProtocolId in interface STPFrame
      Returns:
      Short Returns a Short
    • setProtocolId

      public void setProtocolId(Short protocolId)
      Specified by:
      setProtocolId in interface STPFrame
      Parameters:
      protocolId - Takes in a parameter of protocolId
    • getVersion

      public Byte getVersion()
      Specified by:
      getVersion in interface STPFrame
      Returns:
      Byte Returns a Byte
    • setVersion

      public void setVersion(Byte version)
      Specified by:
      setVersion in interface STPFrame
      Parameters:
      version - Takes in a parameter of version
    • getMessageType

      public STPBpduType getMessageType()
      Specified by:
      getMessageType in interface STPFrame
      Returns:
      STPBpduType Returns a STPBpduType
    • setMessageType

      public void setMessageType(STPBpduType messageType)
      Specified by:
      setMessageType in interface STPFrame
      Parameters:
      messageType - Takes in a parameter of messageType
    • getFlags

      public Byte getFlags()
      Specified by:
      getFlags in interface STPFrame
      Returns:
      Byte Returns a Byte
    • setFlags

      public void setFlags(Byte flags)
      Specified by:
      setFlags in interface STPFrame
      Parameters:
      flags - Takes in a parameter of flags
    • getRootBridgeId

      public STPId getRootBridgeId()
      Specified by:
      getRootBridgeId in interface STPFrame
      Returns:
      STPId Returns a STPId
    • setRootBridgeId

      public void setRootBridgeId(STPId rootBridgeId)
      Specified by:
      setRootBridgeId in interface STPFrame
      Parameters:
      rootBridgeId - Takes in a parameter of rootBridgeId
    • getRootPathCost

      public int getRootPathCost()
      Specified by:
      getRootPathCost in interface STPFrame
      Returns:
      int Returns a int
    • setRootPathCost

      public void setRootPathCost(int rootPathCost)
      Specified by:
      setRootPathCost in interface STPFrame
      Parameters:
      rootPathCost - Takes in a parameter of rootPathCost
    • getBridgeId

      public STPId getBridgeId()
      Specified by:
      getBridgeId in interface STPFrame
      Returns:
      STPId Returns a STPId
    • setBridgeId

      public void setBridgeId(STPId bridgeId)
      Specified by:
      setBridgeId in interface STPFrame
      Parameters:
      bridgeId - Takes in a parameter of bridgeId
    • getPortId

      public Short getPortId()
      Specified by:
      getPortId in interface STPFrame
      Returns:
      Short Returns a Short
    • setPortId

      public void setPortId(Short portId)
      Specified by:
      setPortId in interface STPFrame
      Parameters:
      portId - Takes in a parameter of portId
    • getMessageAge

      public Short getMessageAge()
      Specified by:
      getMessageAge in interface STPFrame
      Returns:
      Short Returns a Short
    • setMessageAge

      public void setMessageAge(Short messageAge)
      Specified by:
      setMessageAge in interface STPFrame
      Parameters:
      messageAge - Takes in a parameter of messageAge
    • getMaxAge

      public Short getMaxAge()
      Specified by:
      getMaxAge in interface STPFrame
      Returns:
      Short Returns a Short
    • setMaxAge

      public void setMaxAge(Short maxAge)
      Specified by:
      setMaxAge in interface STPFrame
      Parameters:
      maxAge - Takes in a parameter of maxAge
    • getHelloTime

      public Short getHelloTime()
      Specified by:
      getHelloTime in interface STPFrame
      Returns:
      Short Returns a Short
    • setHelloTime

      public void setHelloTime(Short helloTime)
      Specified by:
      setHelloTime in interface STPFrame
      Parameters:
      helloTime - Takes in a parameter of helloTime
    • getForwardDelay

      public Short getForwardDelay()
      Specified by:
      getForwardDelay in interface STPFrame
      Returns:
      Short Returns a Short
    • setForwardDelay

      public void setForwardDelay(Short forwardDelay)
      Specified by:
      setForwardDelay in interface STPFrame
      Parameters:
      forwardDelay - Takes in a parameter of forwardDelay
    • getLengthValues

      public List<STPTypeLengthValue> getLengthValues()
      Specified by:
      getLengthValues in interface STPFrame
      Returns:
      List<STPTypeLengthValue> Returns a List<STPTypeLengthValue>
    • setLengthValues

      public void setLengthValues(List<STPTypeLengthValue> lengthValues)
      Specified by:
      setLengthValues in interface STPFrame
      Parameters:
      lengthValues - Takes in a parameter of lengthValues
    • getFieldType

      public PtmpTypeValue getFieldType(String fieldName)
      Overrides:
      getFieldType in class PduImpl
    • read

      public void read(EncodedBuffer buffer)
      Reads this object from an EncodedBuffer of raw data
      Specified by:
      read in interface IPCData
      Overrides:
      read in class PduImpl
      Parameters:
      buffer - The EncodedBuffer that contains the raw data from which to construct this object
    • pduRead

      public void pduRead(EncodedBuffer buffer)
      Specified by:
      pduRead in interface Signal
      Overrides:
      pduRead in class PduImpl
    • getOrderedFieldNames

      public List<String> getOrderedFieldNames()
      Specified by:
      getOrderedFieldNames in interface Signal
      Overrides:
      getOrderedFieldNames in class PduImpl
    • encodeTypeAndPayload

      public void encodeTypeAndPayload(EncodedBuffer buffer)
      Specified by:
      encodeTypeAndPayload in interface Signal
      Overrides:
      encodeTypeAndPayload in class PduImpl